/**
 * 充值记录
 */

import request from "@/request";

/**
 * 综合处理用户购买商品
 * @param formData 以table形式传输至后端的数据
 * @returns {*}
 */
export function comprehensivePurchaseCommodity(formData) {
    return request({
        url: '/user/purchase',
        method: 'post',
        data: formData
    })
}

/**
 * 根据购买商品的用户id分页查询购买信息
 */
export function getPurchaseByUserId(formData) {
    return request({
        url: '/user/purchase/all',
        method: 'post',
        headers: {"Content-Type": "multipart/form-data"},
        data: formData
    })
}

/**
 * 更新用户对应的购买信息的交易状态
 */
export function confirmPurchaseUpdate(formData) {
    return request({
        url: '/user/purchase/confirm/state',
        method: 'post',
        headers: {"Content-Type": "multipart/form-data"},
        data: formData
    })
}